But Girona, who had not won in the league since November, came out with a vengeance in the second half, levelling in the 65th minute with a Cristhian Stuani penalty after a handball by Ramos. Spanish striker Cristian Portu gave Girona an unlikely lead 10 minutes later, nipping in front of Madrid's lacklustre defender Marcelo to nod in on the rebound after Thibaut Courtois could only parry a shot from visiting forward Anthony Lozano.
Madrid substitutes Gareth Bale and Vinicius Jr each squandered opportunities to level and things got worse when Ramos earned a second yellow card in stoppage time and was sent off for the 25th time in club football. Real goalkeeper Courtois came close to salvaging an equaliser late on but headed wide, leaving Real third in the standings on 45 points, nine behind table toppers Barcelona, who beat Real Valladolid 1-0 on Saturday and seven back from second-placed Atletico Madrid, 1-0 winners over Rayo Vallecano.